package model;

import java.util.Date;

/**
 * 收藏实体类
 */
public class Favorite {
    // 收藏ID
    private int id;
    // 用户ID
    private int user_id;
    // 商品ID
    private int goods_id;
    // 创建时间
    private Date create_time;
    // 关联的商品对象
    private Goods goods;

    public Favorite() {
    }

    public Favorite(int user_id, int goods_id) {
        this.user_id = user_id;
        this.goods_id = goods_id;
        this.create_time = new Date();
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getUser_id() {
        return user_id;
    }

    public void setUser_id(int user_id) {
        this.user_id = user_id;
    }

    public int getGoods_id() {
        return goods_id;
    }

    public void setGoods_id(int goods_id) {
        this.goods_id = goods_id;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Goods getGoods() {
        return goods;
    }

    public void setGoods(Goods goods) {
        this.goods = goods;
    }
} 